package com.huaxin.hxenum.validation;

import com.huaxin.hxenum.validator.PriorityValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = PriorityValidator.class)
public @interface ValidPriority {
    // 更新为数字范围
    String message() default "无效的报警优先级，允许值：1(紧急)/2(高)/3(中)/4(低)";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}